BIN=exe
OBJ=$(SRC:.c=.o)
SRC=$(shell ls *.c)
CC=gcc
LFALGS=-o
FLAGS=-c
RM=rm -f

$(BIN):$(OBJ)
	@$(CC) $(LFALGS) $@ $^
	@echo "linking... $^ to $@"
%.o:%.c
	@$(CC) $(FLAGS) $<
	@echo "compiling... $(SRC) to $(OBJ)"

.PHONY:clean
clean:
	@$(RM) $(OBJ) $(BIN)
